package cn.raven.controller;

import cn.raven.entity.User;
import cn.raven.feign.UserFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class PayController {
    @Autowired
    private UserFeignClient userFeignClient;

    @GetMapping("/pay/{id}")
    public User getUser(@PathVariable Long id){
        return userFeignClient.getUser(id);
    }
}
